home *** CD-ROM | disk | FTP | other *** search
- /*
- File: BArray.h
-
- Contains: xxx put contents here xxx
-
- Owned by: Craig Carper
-
- Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 3/15/96 CC 1331422: Added ODAEGetByteArray function.
-
- To Do:
- */
-
- /*
- File: BArray.h
-
- Contains: ByteArray collection
-
- Owned by: Vincent Lo
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
-
-
- */
-
- #ifndef _BARRAY_
- #define _BARRAY_
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef __APPLEEVENTS__
- #include <AppleEvents.h>
- #endif
-
- /* DisposeByteArrayStruct is a macro instead of a function so it can take a different
- parameter type than DisposeByteArray(), and still set the disposed pointer field
- of the structure to null.
- DisposeByteArray() must never be called on a ByteArray structure; DisposeByteArray()
- disposes the structure which is usually a distaster.
- */
-
- #define DisposeByteArrayStruct(byteArray) \
- do{ \
- if (byteArray._buffer != kODNULL) { \
- ODDisposePtr(byteArray._buffer); \
- byteArray._buffer = kODNULL; \
- } \
- byteArray._length = 0; \
- byteArray._maximum = 0; \
- }while(0)
-
-
- #ifdef _OD_IMPL_SHARE_UTILS_
- #pragma import on
- #endif
-
- extern "C" {
- ODByteArray* CreateByteArray(void* buffer, ODULong size);
- ODByteArray CreateByteArrayStruct(void* buffer, ODULong size);
-
- ODByteArray* CreateEmptyByteArray(ODULong maximum);
- ODByteArray CreateEmptyByteArrayStruct(ODULong maximum);
-
- void UseByteArray(ODByteArray* ba, void* buffer, ODULong size);
-
- ODByteArray* CopyByteArray(ODByteArray* fromBA);
- ODByteArray CopyByteArrayStruct(ODByteArray* fromBA);
-
- void DisposeByteArray(ODByteArray* array);
-
- ODBoolean AreByteArraysEqual(ODByteArray* ba1, ODByteArray* ba2);
-
- ODByteArray* ODAEGetByteArray(const AppleEvent *theAppleEvent,
- AEKeyword theAEKeyword,
- DescType desiredType);
- }
-
- #ifdef _OD_IMPL_SHARE_UTILS_
- #pragma import off
- #endif
-
- #endif // _BARRAY_